import { defineStore } from 'pinia'
import { postNewsDetailRequest } from '@/service/module/news/newsdetail'

interface Inewsdetaildemo {
  iid: number
  title: string

  image: string
  content: string
  connectInformation: string
}

export const useNewsDetailStore = defineStore('explaindetail', {
  state: () => ({
    newsdetaildemo: [] as Inewsdetaildemo[],
  }),

  getters: {
    // GET_TRAIN() {
    //     this.getTrainList()
    // }
  },
  actions: {
    async newsDetailResultAction() {
      //实验  getAdminRequest

      const res = await postNewsDetailRequest()
      // console.log(res, '11111')

      this.newsdetaildemo = res.data.data.findNewsDetailData
    },
  },
  // persist: true,
})
